@if(count($replies) > 0)
    <ul class="list-group">
        @foreach($replies as $reply)
            <li class="list-group-item border-0 border-bottom d-flex justify-content-start align-items-center"
                id="reply{{$reply->id}}"
            >
                <a href="{{route('users.show',$reply->user_id)}}">
                    <img width="50"
                         class="img-thumbnail"
                         src="{{$reply->user->avatar}}"
                         alt="{{$reply->user->name}}"
                    >
                </a>
                <div class="flex-grow-1 px-3 d-flex flex-column">
                                    <span><a class="text-decoration-none"
                                             href="{{route('users.show',$reply->user_id)}}">{{$reply->user->name}}</a>
                                        &nbsp;•&nbsp;<small
                                            class="text-secondary">{{$reply->created_at->diffForHumans()}}</small></span>
                    <span class="text-success py-0">{!! $reply->content !!}</span>
                </div>
                @can('destroy',$reply)
                    <form action="{{route('replies.destroy',$reply->id)}}" method="POST"
                          onsubmit="return confirm('您确定要删除吗?')"
                    >
                        @csrf
                        {{method_field('DELETE')}}
                        <button type="submit" class="btn text-secondary">
                            <small class="fa-solid fa-trash-can"></small>
                        </button>
                    </form>
                @endcan
            </li>
        @endforeach
    </ul>
@else
    @include('shared._no_data',['info'=>'该帖暂无回复'])
@endif
